package com.myjar.excel.serializer;

import org.apache.poi.ss.usermodel.Cell;

public class ByteCodec implements ObjectSerializer<Byte> {

    static final ByteCodec instance = new ByteCodec();

    @Override
    public void write(Cell cell, Byte aByte) {
        cell.setCellValue(aByte);
    }

    @Override
    public Byte read(Cell cell) {
        return Byte.parseByte(cell.getNumericCellValue() + "");
    }
}
